Repository navigation
fix(apple): keep the Expo dev menu closed when open launches a dev client - #5053
Conversation
|
Thanks for the fix. At ab5f32e the code looks right, but the live evidence is not complete yet: Not verified here: the before/after in the PR body shows one capture route on an iOS simulator, the nested-window runner shape is covered only by trimmed fixtures, and Android Expo dev menu detection is untested (it may go undetected there, which is no regression). Could React Native overlay recognition stay in one place? react-native-overlay.ts already owns it through analyzeReactNativeOverlay and formatReactNativeOverlayWarning. If readExpoDevMenu lived there, and analyzeReactNativeOverlay reported the open menu (detected, primaryAction 'close-expo-dev-menu' in the existing union), then snapshot-state would pass its surface as modalSurface. The daemon handler would need no change, ExpoDevMenuDismissTarget and the dynamic import would go away, and screenshot --overlay-refs would see the menu too. That drops roughly 40 production lines and turns four call sites into one owner. Not blocking, and fine to take or leave: (1) screenshot-overlay.ts:138 does not report the open menu, so after a failed dismiss-overlay the warning still points to screenshot --overlay-refs; the owner move above fixes that. (2) On the nested path in snapshot-state.ts:354, any container with an 'SDK version' label, a Close button beside it and a Reload button below is read as the menu, so requiring the menu's own window would let the window decide rather than the words. (3) snapshot.ts:274 rescans the nodes for the hint, so the hint and the [covered] marks come from two scans; carrying the detected overlay on SnapshotState would give one fact. No conflicts are known. The two cancelled Body rules runs look superseded by body edits and the diff does not touch that route, so they are likely unrelated, but a fresh passing Body rules run is needed before merge. |
ab5f32e to
cf8049b
Compare
|
|
Thanks for the update. The earlier concerns are addressed at cf8049b, and the PR is ready from the code side. Not blocking: the full-tree fallback in https://github.com/callstack/agent-device/blob/cf8049b/packages/daemon/src/execution/handlers/react-native.ts#L93 runs whenever the interactive capture finds no primary action, so every The only check not passing is Body rules, which was cancelled rather than failed. It reads the PR body format and does not touch any route this diff changes, so it was likely superseded by body edits. No conflicts are known. Before merge, the maintainer needs to approve or reject the two closure-budget rows for Not verified here: the live device runs at cf8049b (iOS simulator snapshot -i and fill refusal, iOS runner dismiss-overlay, Android dismiss-overlay), which rest on the PR body transcript. Not verified here: that Android's -i capture drops the menu header, so the need for the fallback over a smaller capture fix is open. Not verified here: whether the new nested-window and Android fixture tests fail at ab5f32e, or whether any real capture has the shape where the window equals the sheet in windowedExpoDevMenuSurface. |
|
|
Thanks for the follow-up. At 967d6a4 the code looks good, and the open Expo dev menu is now handled on the iOS and Android routes this PR covers. The only check not passing is Body rules, and it was cancelled rather than failed; it reads the PR body format and none of the changed code is on its route, so a new run after a body edit should clear it. The other 15 checks pass at this head, and there are no conflicts. Before merge, a maintainer needs to approve or reject the two closure-budget rows for |
|
Thanks for the detailed captures. The recognizer is solid, but layout heuristics for a third-party UI across three capture shapes, plus two new startup modules, are a lot to keep green against future Expo releases. The evidence in #5003 is the menu at launch, so please try a smaller shape:
That should drop the |
967d6a4 to
99f80e0
Compare
|
|
Thanks for the update. The code at 99f80e0 has no problems, and it keeps the earlier clean result from 967d6a4. The only check that is not passing is Body rules, which was cancelled and did not fail. It reads the PR body format and does not run any code touched here, and the body now has Summary, Before/after and Validation sections. The other 15 checks pass at this head. No conflicts are known. A fresh passing Body rules run is needed before merge, and a re-run should be enough. Not verified here: the simulator before/after (menu closed with disableAutoLaunch=1 on iPhone 17 Pro, SDK 58.0.3) and the Android/iOS hint captures rest on the PR body and the author comment, and no device was driven. Not verified here: SDK 57 behaviour rests on the Expo docs, not on a run. Not verified here: the Swift unit test and the vitest suites were not run, and the saved show-at-launch setting was not observed, so its effect on an app is taken from the Expo docs and the help text. |
Summary
Closes #5003. Follows #5013.
The Expo dev menu opens over the app at launch and takes every tap, so
filltyped into nothing and the hint blamed the app.opennow addsdisableAutoLaunch=1next tourlon theexpo-development-clientURL it builds for a detected dev client. Expo documents this parameter for every SDK (development workflows); it also turns off the app's saved show-at-launch setting. The per-launch__expo_disable_auto_launch=1was rejected: SDK 57 lacks it, and so does the test app's 58.0.3 launcher.formatReactNativeOverlayWarningnames the open menu when the capture has aRuntime version:orSDK version:line plusReloadorGo home, text only. It says to press Close, and to adddisableAutoLaunch=1to a URL of your own. Android'ssnapshot -idrops the version line, so there the hint shows in the fullsnapshot.Before / after
iPhone 17 Pro simulator (iOS 27.2), fresh install of the test app, Metro on 8081; Pixel 9 emulator (Android 16).
Validation
99f80e004,check:affected --run --head,exactCommit: true: format, lint, typecheck, layering, fallow, native-dupes, build and vitest-related pass;check:command-docspasses.